<div class="panel panel-success" name="panel" style="height: 780px">
    <div class="panel-heading">已办工作卡<span class="pagination_count">------共<strong>{{ pages.total }}</strong>条已办任务 </span></div>
    <ul class="nav nav-tabs">
        <li class="active"><a href="#done" data-toggle="tab">我的已办</a></li>
        <li><a href="#order" data-toggle="tab">我的改派</a></li>
    </ul>
    <div class="tab-content">
        <div class="tab-pane active" id="done">
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-12 form-group done-picker">
                        <div class='col-sm-6'>
                            <div class="form-group">
                                <label>选择开始时间：</label>
                                <!--指定 date标记-->
                                <div class='input-group date' id='datetimepickers'>
                                    <input type='text' class="form-control" name="starttime" id="starttime"/>

                                    <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
                                </div>
                            </div>
                        </div>
                        <div class='col-sm-6'>
                            <div class="form-group">
                                <label>选择结束时间：</label>
                                <!--指定 date标记-->
                                <div class='input-group date' id='datetimepickere'>
                                    <input type='text' class="form-control" name="endtime" id="endtime"/>
                                    <span class="input-group-addon">
                    <span class="glyphicon glyphicon-calendar"></span>
                </span>
                                </div>
                            </div>
                        </div>

                        <button type="submit" class="btn btn-primary btn-sm btn-block do-pickup " id="dopicker">按时间筛选
                        </button>

                    </div>
                </div>
                <script type="text/javascript">
                    var mydata = new Date();
                    var lastM = new Date(new Date().setMonth(new Date().getMonth() - 1));
                    {#var mudata2 = mydata.setMonth(mydata.getMonth() - 1)#}
                    $(function () {
                        var picker1 = $('#datetimepickers').datetimepicker({
                            format: 'YYYY-MM-DD',
                            locale: moment.locale('zh-cn'),
                            defaultDate: lastM.toLocaleDateString()
                            //minDate: '2016-7-1'
                        });
                        var picker2 = $('#datetimepickere').datetimepicker({
                            format: 'YYYY-MM-DD',
                            locale: moment.locale('zh-cn'),
                            defaultDate: mydata.toLocaleDateString()
                        });
                        //动态设置最小值
                        picker1.on('dp.change', function (e) {
                            picker2.data('DateTimePicker').minDate(e.date);
                        });
                        //动态设置最大值
                        picker2.on('dp.change', function (e) {
                            picker1.data('DateTimePicker').maxDate(e.date);
                        });
                    });
                </script>
                <div style="height: 560px">
                    {% if listdatadone %}
                        {% for item in listdatadone %}
                            <div class="panel panel-default" name="taskcarddone"
                                 style="background-color: rgba(107,255,107,0.12)">
                                <div class="panel-body">
                                    <div class="row">
                                        <div class="col-lg-10">
                                            <h4 style="margin-top: 0px">IT类任务 <span
                                                    class="label label-success">完成</span></h4>
                                        </div>
                                    </div>
                                    <p style="font-size:15px;color: #2e6da4 ;margin-top: 5px">
                                        {{ item.listdata }}{{ item.listcontent }}
                                    </p>
                                    <div class="row">
                                        <p style="font-size:15px; margin-left: 15px">
                                            <strong>备注：</strong>{{ item.listremark }}
                                        </p>
                                    </div>
                                </div>
                            </div>
                        {% endfor %}
                    {% endif %}
                    <div>
                        {% include "common/pagenation.html" %}
                    </div>
                </div>
            </div>
        </div>
        <div class="tab-pane" id="order">
            <div class="panel-body">
                <div style="height: 830px;;overflow: auto">
                    {% if mycreatelist %}
                        {% for item in mycreatelist %}
                            <div class="panel panel-default" name="taskcarddone"
                                 style="background-color: rgba(170,223,255,0.22)">
                                <div class="panel-body">
                                    <div class="row">
                                        <div class="col-lg-9">
                                            <h4 style="margin-top: 0px">IT类任务 <span
                                                    class="label label-success">改派</span> <span
                                                    class="label label-primary"
                                                    style="margin-left: 10px">{% if not item.uid  == item.createuid %}
                                                {{ item.creater }} 处理中{% endif %}</span></h4>
                                        </div>
                                        <div class="col-lg-3">
                                            <div class="btn-group btn-block">
                                                <a type="button" class="btn btn-primary btn-block "
                                                   href="{{ '%s/%s?id=%s&stat=1' | format( buildUrl('/work'),item.type,item.id) }}">操作
                                                </a>

                                            </div>
                                        </div>
                                    </div>
                                    <p style="font-size:15px;color: #2e6da4 ;margin-top: 5px">
                                        {{ item.listdata }}{{ item.listcontent }}
                                    </p>
                                    <div class="row">
                                        <p style="font-size:15px; margin-left: 15px">
                                            <strong>备注：</strong>{{ item.listremark }}
                                        </p>
                                    </div>
                                </div>
                            </div>
                        {% endfor %}
                    {% endif %}

                </div>
            </div>
        </div>

    </div>
</div>



